exec(open(app.root_path + '/constants/app_constants.py').read())

FIREFOX_WEBDRIVER = "<class 'selenium.webdriver.firefox.webdriver.WebDriver'>"

# root_tests.py
TITLE_UNESCAPED_TEXT = b'<Hello>'
TITLE_ESCAPED_TEXT   = b'&lt;Hello&gt;'
HTML_ALLOWED_TEXT    = b'<strong>HTML</strong> allowed'

# selenium_steps.py
NOTABUG_HOME_URL  = 'https://notabug.org/'
NOTABUG_LOGIN_URL = 'https://notabug.org/user/login'
NOTABUG_LOGIN_INPUT_ID  = 'user_name'
PASS_INPUT_ID   = 'password'
LOGIN_BTN_ID    = 'home-login-btn'
HEADER_DIV_ID   = 'header-div'
LOGIN_ERROR_CSS = '.ui.negative.message'
NOTABUG_HOME_TITLE         = "NotABug.org: Free code hosting"
NOTABUG_HOME_TITLE_H2_ID   = 'home-title-h2'
NOTABUG_HOME_TITLE_H2_TEXT = "{ 'NotABug.org': \"Free code hosting\" }"
NOTABUG_LOGIN_TITLE        = "Sign In - " + NOTABUG_HOME_TITLE
NAB_LOGIN_ERROR_TEXT       = "Username or password is not correct."

# crud_tests.py
LOGIN_INPUT_NAME = 'username'
PASS_INPUT_NAME  = 'password'
LOGIN_BTN_NAME   = 'login-btn'
CREATE_POST_PARAMS = dict() ; CREATE_POST_PARAMS[TITLE_KEY] = TITLE_UNESCAPED_TEXT ; CREATE_POST_PARAMS[MESSAGE_KEY] = HTML_ALLOWED_TEXT ;
TEST_POST_1        = dict() ; TEST_POST_1       [TITLE_KEY] = 'title-1'            ; TEST_POST_1       [MESSAGE_KEY] = 'message-1'       ;
TEST_POST_2        = dict() ; TEST_POST_2       [TITLE_KEY] = 'title-2'            ; TEST_POST_2       [MESSAGE_KEY] = 'message-2'       ;
UPDATE_POST_PARAMS = CREATE_POST_PARAMS.copy() ; UPDATE_POST_PARAMS[DBID_KEY] = 2 ;
TEST_POST_1_PATH      = INDEX_POSTS_ROUTE + '/' + TEST_POST_1[TITLE_KEY]
TEST_POST_2_PATH      = INDEX_POSTS_ROUTE + '/' + TEST_POST_2[TITLE_KEY]
TEST_POST_EDIT_PATH   = TEST_POST_2_PATH + EDIT_PATH
TEST_POST_UPDATE_PATH = TEST_POST_2_PATH + UPDATE_PATH
TEST_POST_DELETE_PATH = TEST_POST_2_PATH + DELETE_PATH
CREATED_POST_PATH = INDEX_POSTS_ROUTE + '/' + CREATE_POST_PARAMS[TITLE_KEY].decode()
RESP_URL_KEY   = 'Location'

SERVER_URL  = 'http://localhost:5000'
CONTROLLERS = { 'home' : ROOT_ROUTE        ,
                'login': LOGIN_ROUTE       ,
                'post' : INDEX_POSTS_ROUTE ,
                'posts': INDEX_POSTS_ROUTE }
ACTIONS     = { 'all'  : '/'               ,
                'new'  : NEW_PATH          }
